
    <!-- Page content -->
    <div class="container mt--8 pb-5">
      <div class="row justify-content-center">
        <div class="col-lg-5 col-md-7">
          <div class="card bg-secondary shadow border-0">
            <div class="card-header bg-transparent pb-5">

              <div class="text-muted text-center mt-2 mb-3">
              
                {% if msg %}
                  <span class="text-danger">{{ msg | safe }}</span>
                {% else %}
                  Sign in
                {% endif %}

              </div>
              
            </div>
            <div class="card-body px-lg-5 py-lg-5">

              <form role="form" method="post" action="">

                {{ form.hidden_tag() }}

                <div class="form-group mb-3">
                  <div class="input-group input-group-alternative">
                    <div class="input-group-prepend">
                      <span class="input-group-text"><i class="ni ni-hat-3"></i></span>
                    </div>
                    {{ form.username(placeholder="用户名",class="form-control") }}
                  </div>
                </div>
                <div class="form-group">
                  <div class="input-group input-group-alternative">
                    <div class="input-group-prepend">
                      <span class="input-group-text"><i class="ni ni-lock-circle-open"></i></span>
                    </div>
                    {{ form.password(placeholder="密码",class="form-control",type="password") }}
                  </div>
                </div>

                <div class="text-center">
                  <button type="submit" class="btn btn-primary my-4">登录</button>
                </div>
              </form>
            </div>
          </div>
          <div class="row mt-3 text-center">
            <div class="col-12">
              <a href={{ url_for('register') }} class="text-light"><small>创建新用户</small></a>
            </div>
          </div>
        </div>
      </div>
    </div>

